<template>
  <!-- <GridBox :areas="['one two', 'three four']" :column-gap="'2px'" :row-gap="'2px'" :border="true">
    <template #one>
      <div v-loading="loading">{{ title }}</div>
    </template>
    <template #four>
      <RouterView></RouterView>
    </template>
  </GridBox> -->
  <!-- <div>
    <ElSwitch v-model="border"></ElSwitch>
    <ElInput v-model="columnGap">
      <template #prepend>
        列gap
      </template>
      <template #append>
        <ElButton>确定</ElButton>
      </template>
    </ElInput>
    <ElInput v-model="rowGap">
      <template #prepend>
        行gap
      </template>
      <template #append>
        <ElButton>确定</ElButton>
      </template>
    </ElInput>
    <ElInput v-model="value">
      <template #append>
        <ElButton>确定</ElButton>
      </template>
    </ElInput>
  </div>
  <div class="w100vw h90vh">
    <GridBox :areas="areas" :column-gap="columnGap" :row-gap="rowGap" :border="border">
      <template v-for="(areaName, i) in ['one', 'two']" #[areaName]>
        <component :is="getCrud()" :action="action" />
      </template>
    </GridBox>
  </div> -->
</template>
<script setup lang="ts">
defineProps<{title: string}>()
  // import { GridBox } from './components/GridBox';
  // import { onMounted, ref } from 'vue';

  // const loading = ref(false)
  // const b = () => {
  //   loading.value = false
  //   setTimeout(a, 2000)
  // }
  // const a = () => {
  //   loading.value = true
  //   setTimeout(b, 2000)
  // }
  // onMounted(() => {
  //   setTimeout(a, 1000)
  // })
//   import { ElButton, ElInput, ElSwitch } from 'element-plus';
// import { getApp } from './seed-application';
// import { getCrud } from './seed-application/components';
// import { computed, ref } from 'vue';

//   const action = getApp().seeds['organization'].actions['page']
  
//   const columnGap = ref<string>('')
//   const rowGap = ref<string>('')
//   const value = ref<string>('')
//   const areas = computed(() => value.value.split(',').map(e => e.trim()))

//   const border = ref(false)
</script>